<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" href="comment.css" type="text/css" charset="utf-8" />
        <title></title>
    </head>
    <body background="image/bgcomment.png" style="background-repeat: no-repeat">
        <form method="POST" id="form3">
            <div id="topic">
                <input type="text" name="topic" value="" size="30"/>
            </div>

            <div id="usercom">
            <input type="text" name="usercom" value="" />
            </div>

            <div id="emailcom">
                <input type="text" name="emailcom" value="" size="29"/>
            </div>

            <div id="bttcom">
                <input type="submit" value="Send !" name="sendcom"/>
            </div>

            <div id="commentbox">
            <textarea name="descrip" rows="11" cols="80">
            </textarea>   
            </div>
            
        </form>
        <div id="bttback">
            <form action="roomlist.php" method="POST">

                <input type="submit" value="Back to Chat Room" />

        </form>
            </div>

        


        <div id="statuscomment">
<?php
        $topic = $_POST[topic];
        //echo $topic;

        $usercom = $_POST[usercom];
        //echo $usercom;

        $emailcom = $_POST[emailcom];
        //echo $emailcom;
        
        $descrip = $_POST[descrip];
        //echo $descrip;

        $link = mysql_connect("localhost","root","");
        mysql_select_db("ilink");

        if($topic!=""&& $emailcom!="" && $usercom!="" && $descrip!=""){
        mysql_query("INSERT INTO comment (topic,username,email,description)
		VALUES ('$topic','$usercom','$emailcom','$descrip')");
		echo "complete . . . Thank you. ";
        }
        else {
                echo "not send now !!";
        }
        mysql_close($link);
?>
            </div>

        
    </body>
</html>
